package com.bw.exam.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bw.exam.pojo.ItemCat;
import com.bw.exam.pojo.TypeTemplate;
import com.bw.exam.result.R;
import com.bw.exam.service.ItemCatService;
import com.bw.exam.service.TypeTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author: liuzhiping
 * @date: 2024/7/25 11:49
 **/
@Slf4j
@RestController
@RequestMapping("/business/typeTemplate")
public class TypeTemplateController {

    @Autowired
    private TypeTemplateService typeTemplateService;

    @GetMapping("/findById/{id}")
    public R findById(@PathVariable  Long id){
        log.info("商品模板 id:"+ id);
        LambdaQueryWrapper<TypeTemplate> queryWrapper = new LambdaQueryWrapper<TypeTemplate>();
        queryWrapper.eq(TypeTemplate::getId,id);
        return R.success(this.typeTemplateService.getOne(queryWrapper));
    }

}

